<?php
include "downFunc.php";
// $urldata = isset($GLOBALS["HTTP_RAW_POST_DATA"]) ? $GLOBALS["HTTP_RAW_POST_DATA"] : '';
$urldata = file_get_contents("php://input");
$urldata = get_object_vars(json_decode($urldata));

$cnt = 0;
while (1) {
    $return = subpackage($urldata);    
    if (-2 != $return || 3 == $cnt || strlen($return)>10 ) {
        break;
    }
    $cnt++;
}
echo base64_encode($return);
?>